package com.pure.database.objectbox.entity

import io.objectbox.annotation.Backlink
import io.objectbox.annotation.Entity
import io.objectbox.annotation.Id
import io.objectbox.relation.ToMany

//@Uid
@Entity
data class User(
    @Id
    var id: Long = 0,
    var name: String = "",
    var age: Int = 0,
    var sex: String? = "男",
) {
    @Backlink(to = "user")
    var orders: MutableList<Order> = ToMany(this, User_.orders)
}